/**
 * GUI ProgressBar：具有渐变色的进度条
 */

#ifndef __G_PROGRESS_BAR
#define __G_PROGRESS_BAR

#include "GWidget.h"

#define G_BAR_MAX_W 180

typedef struct _GProgressBar GProgressBar;
#define G_PROGRESS_BAR(any) ((GProgressBar *)(any))

extern GWidget *g_progress_bar_new(uint16_t bar_length);

/**
 * @brief 设置进度条百分比
 */
extern void g_progress_bar_set_percent(GProgressBar *self, float percent);

/**
 * @brief 设置进度条颜色
 */
extern void g_progress_bar_set_color(GProgressBar *self, uint16_t color);

/**
 * @brief 重置进度条
 */
extern void g_progress_bar_reset(GProgressBar *self);

#endif
